<% layout('/layouts/default.html', {title: '项目信息管理', libs: ['validate']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header with-border">
			<div class="box-title">
				<i></i>
			</div>
			<div class="box-tools pull-right">
				<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
			</div>
		</div>

		<div id="printcontent" style="display:none"></div>
		<#form:form id="inputForm" model="${ajzProjectInfo}" action="${ctx}/hl_project/ajzProjectInfo/save" method="post" class="form-horizontal">
			<!--startprint-->
			<div class="box-body">
				<div class="form-unit"></div>
				<#form:hidden path="id"/>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
								<label class="control-label col-sm-4" title="">
									<span class="required ">*</span> ${text('项目名称')}：<i class="fa icon-question hide"></i></label>
								<div class="col-sm-8">
									<#form:input value="${text(ajzProjectInfo.projectName)}" maxlength="20" disabled="true"   class="form-control required"/>
								</div>
							</div>
						</div>
						<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> ${text('项目类别')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8" readonly="readonly">
								<#form:select path="projectType" dictType="project_type" class="form-control required" disabled="true"  />
							</div>
						</div>
					</div>

				</div>
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required ">*</span> ${text('所在街道')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:select path="street" dictType="hlq_street" class="form-control required" disabled="true" />
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('地址')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="address" maxlength="255" class="form-control" disabled="true" />
							</div>
						</div>
					</div>
				</div>
				<!--<div class="row">-->
					<!--<div class="col-xs-6">-->
						<!--<div class="form-group">-->
							<!--<label class="control-label col-sm-4" title="">-->
								<!--<span class="required hide">*</span> ${text('法人')}：<i class="fa icon-question hide"></i></label>-->
							<!--<div class="col-sm-8">-->
								<!--<#form:input path="legalPerson" maxlength="200" class="form-control" disabled="true" />-->
							<!--</div>-->
						<!--</div>-->
					<!--</div>-->
					<!--<div class="col-xs-6">-->
						<!--<div class="form-group">-->
							<!--<label class="control-label col-sm-4" title="">-->
								<!--<span class="required hide">*</span> ${text('法人手机')}：<i class="fa icon-question hide"></i></label>-->
							<!--<div class="col-sm-8">-->
								<!--<#form:input path="legalPersonTel" maxlength="20" class="form-control mobile" disabled="true" />-->
							<!--</div>-->
						<!--</div>-->
					<!--</div>-->
				<!--</div>-->
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('联系人')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="contactPerson" maxlength="255" class="form-control" disabled="true" />
							</div>
						</div>
					</div>
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('联系人手机')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:input path="contactPersonTel" maxlength="20" class="form-control mobile" disabled="true" />
							</div>
						</div>
					</div>
				</div>
				<!--<div class="row">-->
					<!--<div class="col-xs-6">-->
						<!--<div class="form-group">-->
							<!--<label class="control-label col-sm-4" title="">-->
								<!--<span class="required hide">*</span> ${text('对接人')}：<i class="fa icon-question hide"></i></label>-->
							<!--<div class="col-sm-8">-->
								<!--<#form:input path="joinContactPerson" maxlength="255" class="form-control" disabled="true" />-->
							<!--</div>-->
						<!--</div>-->
					<!--</div>-->
					<!--<div class="col-xs-6">-->
						<!--<div class="form-group">-->
							<!--<label class="control-label col-sm-4" title="">-->
								<!--<span class="required hide">*</span> ${text('对接人手机号')}：<i class="fa icon-question hide"></i></label>-->
							<!--<div class="col-sm-8">-->
								<!--<#form:input path="joinContactPersonTel" maxlength="20" class="form-control" disabled="true" />-->
							<!--</div>-->
						<!--</div>-->
					<!--</div>-->
				<!--</div>-->
				<div class="row">
					<div class="col-xs-6">
						<div class="form-group">
							<label class="control-label col-sm-4" title="">
								<span class="required hide">*</span> ${text('简介')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-8">
								<#form:textarea path="explain" rows="4" maxlength="255" class="form-control" disabled="true" />
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('备注')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-10">
								<#form:textarea path="remarks" rows="4" maxlength="300" class="form-control" disabled="true" />
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--endprint-->
			<div class="box-footer">
				<div class="row">
					<div class="col-sm-offset-2 col-sm-10">
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('返 回')}</button>
						<button type="button" class="btn btn-sm btn-default" id="" onclick="doPrint()"><i class="fa fa-reply-all"></i> ${text('打 印')}</button>
					</div>
				</div>
			</div>
		</#form:form>

	</div>
</div>
<% } %>
<script>
$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == Global.TRUE){
				js.closeCurrentTabPage(function(contentWindow){
					contentWindow.page();
				});
			}
		}, "json");
    }
});



function doPrint() {
	var bdhtml=window.document.body.innerHTML;
	var sprnstr="<!--startprint-->"; //开始打印标识字符串有17个字符
	var eprnstr="<!--endprint-->"; //结束打印标识字符串
	var prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); //从开始打印标识之后的内容
	var prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); //截取开始标识和结束标识之间的内容
	window.document.body.innerHTML=prnhtml; //把需要打印的指定内容赋给body.innerHTML
	window.print(); //调用浏览器的打印功能打印指定区域
	window.document.body.innerHTML=bdhtml;//重新给页面内容赋值；
	return false;
}
</script>